package com.ludomancy.starwave;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;

import com.ludomancy.gamelib.Theme;
import com.ludomancy.gamelib.Utils;

public class StarwaveTheme extends Theme
{
	public Font textFont; //= new Font("Verdana",Font.BOLD, 12);
	public Font idleBarFont; //= new Font("Verdana",Font.BOLD, 12);
	public Font tinyFont;
	
	public StarwaveTheme()
	{
		defaultFont = new Font("Tahoma",Font.BOLD, 14);
		try
		{
			textFont = defaultFont.deriveFont(Font.BOLD, 14 );
			Font title = Utils.loadFont("/fonts.ttf");
			idleBarFont = title.deriveFont(Font.PLAIN, 14 );
			defaultFont = title.deriveFont(Font.PLAIN, 18 );
			tinyFont = title.deriveFont(Font.PLAIN, 13 );
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		
	}
	
	public void fillUIBackground(Graphics g, Rectangle area)
	{
		g.setColor(getUIBackgroundColor());
		g.fillRoundRect(0, 0, area.width, area.height, 10, 10);
		g.setColor(getDefaultBorderColor());
		g.drawRoundRect(0, 0, area.width-1, area.height-1, 10, 10);
	}
	
	public Color getDefaultTextColor()
	{
		return new Color(0xFAAB19);
	}
	
	public Color getDefaultBorderColor()
	{
		return Color.WHITE;
	}
	
	public Color getUIBackgroundColor()
	{
		return new Color(100, 100, 100);
	}
	
	public void fillButton(Graphics g, Rectangle area, boolean etched)
	{
		Graphics2D g2 = (Graphics2D) g;
		g2.setColor(new Color(100, 100, 100));
		g2.fill3DRect(0, 0, area.width-1, area.height-1, !etched);
	}
}
